package cn.calm.repaymentNotice.entity;

import android.os.Parcel;
import android.os.Parcelable;

public class RepaymentNotice implements Parcelable {
	public static final int TYPE_CREDIT_CARD = 0, TYPE_CREDIT_PLAN = 1;
	public long id;
	public String name;
	public int noticeType;
	public int repaymentDate;
	public int preNoticeDays;
	public int year;
	public RepaymentNotice() {
		id = -1;
	}
	@Override
	public String toString() {
		return "RepaymentNotice [id=" + id + ", name=" + name + ", noticeType="
				+ noticeType + ", repaymentDate=" + repaymentDate
				+ ", preNoticeDays=" + preNoticeDays + "]";
	}

	public int describeContents() {
		return 0;
	}

	public void writeToParcel(Parcel dest, int flags) {
		dest.writeLong(id);
		dest.writeString(name);
		dest.writeInt(noticeType);
		dest.writeInt(repaymentDate);
		dest.writeInt(preNoticeDays);
		dest.writeInt(year);
	}

	public static final Parcelable.Creator<RepaymentNotice> CREATOR = new Parcelable.Creator<RepaymentNotice>() {
		// 重写Creator

		public RepaymentNotice createFromParcel(Parcel source) {
			RepaymentNotice p = new RepaymentNotice();
			p.id=source.readLong();
			p.name = source.readString();
			p.noticeType=source.readInt();
			p.repaymentDate=source.readInt();
			p.preNoticeDays=source.readInt();
			p.year=source.readInt();
			return p;
		}

		public RepaymentNotice[] newArray(int size) {
			return null;
		}

	};
}
